var URL = "http://192.168.101.50:8080/geoserver/indoor/wms?";
var indoor = "indoor:";

var mapSource = {
    F1: {url: URL, layer: indoor + "F1"},
    F2: {url: URL, layer: indoor + "F2"},
    F3: {url: URL, layer: indoor + "F3"},
    F4: {url: URL, layer: indoor + "F4"},
    F5: {url: URL, layer: indoor + "F5"},
    OtherDivision: {url: URL, layer: indoor + "mmgrid"},
    WaterLevel: {url: URL, layer: indoor + "firewaterlevel"},
    AdDivision: {url: URL, layer: indoor + "adivision"},
    LatLngGrid: {url: URL, layer: indoor + "latlnggrid"},
    FireDoorList: {url: URL, layer: indoor + "firedoor"},
    TempList: {url: URL, layer: indoor + "thermometer"},
    VideoList: {url: URL, layer: indoor + "video"},
    AlarmList: {url: URL, layer: indoor + "alerm"},
    Index: {url: URL, layer: indoor + "index"},
    Enterprise: {url: URL, layer: indoor + "fire_enterprise"},
    Power: {url: URL, layer: indoor + "power"},
    Smoke: {url: URL, layer: indoor + "smoke"},
    Route: {url: URL, layer: indoor + "test"},
    Xfss: {url: "http://192.168.101.50:8080/geoserver/power/wms?", layer: "power:xfss"},
    Xfll: {url: "http://192.168.101.50:8080/geoserver/power/wms?", layer: "power:xfll"},
    fire_Enterprise: {url: "http://192.168.101.50:8080/geoserver/power/wms?", layer: "power:fire_Enterprise"},
    DangerousArea: {url: "http://192.168.101.50:8080/geoserver/power/wms?", layer: "power:DangerousArea"},
    LinkUnit: {url: "http://192.168.101.50:8080/geoserver/power/wms?", layer: "power:linkageunit"}
};

var BaseLayers={
    _mapBoxUrl:'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}',
    _token:'pk.eyJ1IjoiaGFtYnVnZXJkZXZlbG9wIiwiYSI6ImNqNXJtZzczcDB6aHgycW1scXZqd3FpNmcifQ.d4p32JmAhTek8BUIt3WGLw',
    _layer:[
        {
            title: "道路地图",
            icon: "img/streets.png",
            id: "mapbox.streets"

        },
        {
            title: "深色地图",
            icon: "img/dark.png",
            id: "mapbox.dark"

        },
        {
            title: "浅色地图",
            icon: "img/light.png",
            id: "mapbox.light"
        },
        {
            title: "卫星图",
            icon: "img/satellite.png",
            id: "mapbox.satellite"
        },
        {
            title: "道路卫星图",
            icon: "img/streets-satellite.png",
            id: "mapbox.streets-satellite"
        },
        {
            title: "户外地图",
            icon: "img/outdoors.png",
            id: "mapbox.outdoors"
        },
        {
            title: "涂鸦地图",
            icon: "img/wheatpaste.png",
            id: "mapbox.wheatpaste"
        },
        {
            title: "黑白地图",
            icon: "img/high-contrast.png",
            id: "mapbox.high-contrast"
        },
        {
            title: "基础道路图",
            icon: "img/streets-basic.png",
            id: "mapbox.streets-basic"
        },
        {
            title: "漫画地图",
            icon: "img/comic.png",
            id: "mapbox.comic"
        },
        {
            title: "旅行地图",
            icon: "img/run-bike-hike.png",
            id: "mapbox.run-bike-hike"
        },
        {
            title: "素描地图",
            icon: "img/pencil.png",
            id: "mapbox.pencil"
        },
        {
            title: "海盗地图",
            icon: "img/pirates.png",
            id: "mapbox.pirates"
        },
        {
            title: "绿宝石地图",
            icon: "img/emerald.png",
            id: "mapbox.emerald"
        }
    ]
};
BaseLayers.getMapBoxUrl=function () {
    return this._mapBoxUrl
};

BaseLayers.getToken=function () {
    return this._token
};

BaseLayers.getSize=function () {
    return this._layer.length;
};

BaseLayers.getLayerDetails=function (i) {
    return this._layer[i];
};